package org.jspecs;

import java.lang.reflect.Method;

public class SpecRunner {

	public void processSpecs(Object obj) {
		try {
			Class<?> cl = obj.getClass();
			Object t = cl.newInstance();
			
			for(Method m : cl.getDeclaredMethods()) {
				m.setAccessible(true);
				Spec spec = m.getAnnotation(Spec.class);
				if(spec != null ) {
					Object[] objArray = null;
					m.invoke(t,objArray);
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	
}
